package com.sutuijingling.a;

import com.android.uiautomator.core.UiDevice;
import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.sutuijingling.result.c;
import com.sutuijingling.utils.b;
import org.apache.http.HttpStatus;

public class d extends e {
    public d(UiDevice uiDevice) {
        this.device = uiDevice;
        System.out.println(" init imei viewer :" + this.device);
    }

    public void a() throws c, UiObjectNotFoundException {
        b.b("DSImeiViewer", " DO imei>>>>");
        if (isPackageImes(3)) {
            b.b("DSImeiViewer", " start to change the model...");
            UiObject findText = findText("更换", 5);
            ensureExist(findText, " change imei button not found...");
            com.sutuijingling.utils.c.c(findText);
            com.sutuijingling.utils.c.c();
            com.sutuijingling.utils.c.c(findText);
            com.sutuijingling.utils.c.c();
            com.sutuijingling.utils.c.c(findText);
            com.sutuijingling.utils.c.e();
            findText = findText("写入", 5);
            ensureExist(findText, " write imei button not found...");
            com.sutuijingling.utils.c.c(findText);
            com.sutuijingling.utils.c.e();
            return;
        }
        throw new c(HttpStatus.SC_NOT_FOUND, "can not go into the apk of imei");
    }
}
